package com.ecoolex.discount.sales.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *   支付订单<br>
 *<br>
 * 数据表： payment_order
 *
 */
@Description({"支付订单"})
public class PaymentOrder implements Serializable {
    /**
     *
     *   主键    <br>
     *<br>
     * 字段名： payment_order.PaymentOrderId
     */
    @Description({"主键", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer paymentOrderId;

    /**
     *
     *   用户Id    <br>
     *<br>
     * 字段名： payment_order.UserId
     */
    @Description({"用户Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer userId;

    /**
     *
     *   业务类型    <br>
     *<br>
     * 字段名： payment_order.BizType
     */
    @Description({"业务类型", "不能为空", "数据长度: 190"})
    @NonNull
    private String bizType;

    /**
     *
     *   订单编号    <br>
     *<br>
     * 字段名： payment_order.OrderNo
     */
    @Description({"订单编号", "不能为空", "数据长度: 190"})
    @NonNull
    private String orderNo;

    /**
     *
     *   预支付币种    <br>
     *<br>
     * 字段名： payment_order.PrepaidCurrencyType
     */
    @Description({"预支付币种", "不能为空", "数据长度: 10"})
    @NonNull
    private String prepaidCurrencyType;

    /**
     *
     *   预支付金额    <br>
     *<br>
     * 字段名： payment_order.PrepaidPrice
     */
    @Description({"预支付金额", "不能为空", "数据长度: 18"})
    @NonNull
    private BigDecimal prepaidPrice;

    /**
     *
     *   支付类型; 微信支付    <br>
     *<br>
     * 字段名： payment_order.PaymentType
     */
    @Description({"支付类型; 微信支付", "数据长度: 255"})
    private String paymentType;

    /**
     *
     *   支付币种    <br>
     *<br>
     * 字段名： payment_order.PaymentCurrencyType
     */
    @Description({"支付币种", "数据长度: 10"})
    private String paymentCurrencyType;

    /**
     *
     *   支付金额    <br>
     *<br>
     * 字段名： payment_order.PaymentPrice
     */
    @Description({"支付金额", "数据长度: 18"})
    private BigDecimal paymentPrice;

    /**
     *
     *   支付人民币金额    <br>
     *<br>
     * 字段名： payment_order.RmbAmount
     */
    @Description({"支付人民币金额", "数据长度: 18"})
    private BigDecimal rmbAmount;

    /**
     *
     *   支付订单号    <br>
     *<br>
     * 字段名： payment_order.PaymentNo
     */
    @Description({"支付订单号", "数据长度: 255"})
    private String paymentNo;

    /**
     *
     *   支付成功时间    <br>
     *<br>
     * 字段名： payment_order.PaymentTime
     */
    @Description({"支付成功时间", "数据长度: 26"})
    private Date paymentTime;

    /**
     *
     *   支付备注信息    <br>
     *<br>
     * 字段名： payment_order.PaymentRemarks
     */
    @Description({"支付备注信息", "数据长度: 1000"})
    private String paymentRemarks;

    /**
     *
     *   退款金额(目前全额退款)    <br>
     *<br>
     * 字段名： payment_order.RefundPrice
     */
    @Description({"退款金额(目前全额退款)", "数据长度: 18"})
    private BigDecimal refundPrice;

    /**
     *
     *   支付状态;支付中;支付成功;支付失败;退款中,退款成功,退款失败    <br>
     *<br>
     * 字段名： payment_order.Status
     */
    @Description({"支付状态;支付中;支付成功;支付失败;退款中,退款成功,退款失败", "不能为空", "数据长度: 5"})
    @NonNull
    private Integer status;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： payment_order.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： payment_order.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： payment_order.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： payment_order.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： payment_order.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   主键    <br>
     *<br>
     * 字段名： payment_order.PaymentOrderId
     */
    public Integer getPaymentOrderId() {
        return paymentOrderId;
    }

    /**
     * 设置参数<br><br>
     *
     *   主键<br>
     *<br>
     * 字段名： payment_order.PaymentOrderId
     */
    public void setPaymentOrderId(Integer paymentOrderId) {
        this.paymentOrderId = paymentOrderId;
    }

    /**
     * 获取参数<br><br>
     *
     *   用户Id    <br>
     *<br>
     * 字段名： payment_order.UserId
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置参数<br><br>
     *
     *   用户Id<br>
     *<br>
     * 字段名： payment_order.UserId
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取参数<br><br>
     *
     *   业务类型    <br>
     *<br>
     * 字段名： payment_order.BizType
     */
    public String getBizType() {
        return bizType;
    }

    /**
     * 设置参数<br><br>
     *
     *   业务类型<br>
     *<br>
     * 字段名： payment_order.BizType
     */
    public void setBizType(String bizType) {
        this.bizType = bizType == null ? null : bizType.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   订单编号    <br>
     *<br>
     * 字段名： payment_order.OrderNo
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   订单编号<br>
     *<br>
     * 字段名： payment_order.OrderNo
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo == null ? null : orderNo.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   预支付币种    <br>
     *<br>
     * 字段名： payment_order.PrepaidCurrencyType
     */
    public String getPrepaidCurrencyType() {
        return prepaidCurrencyType;
    }

    /**
     * 设置参数<br><br>
     *
     *   预支付币种<br>
     *<br>
     * 字段名： payment_order.PrepaidCurrencyType
     */
    public void setPrepaidCurrencyType(String prepaidCurrencyType) {
        this.prepaidCurrencyType = prepaidCurrencyType == null ? null : prepaidCurrencyType.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   预支付金额    <br>
     *<br>
     * 字段名： payment_order.PrepaidPrice
     */
    public BigDecimal getPrepaidPrice() {
        return prepaidPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   预支付金额<br>
     *<br>
     * 字段名： payment_order.PrepaidPrice
     */
    public void setPrepaidPrice(BigDecimal prepaidPrice) {
        this.prepaidPrice = prepaidPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付类型; 微信支付    <br>
     *<br>
     * 字段名： payment_order.PaymentType
     */
    public String getPaymentType() {
        return paymentType;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付类型; 微信支付<br>
     *<br>
     * 字段名： payment_order.PaymentType
     */
    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType == null ? null : paymentType.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   支付币种    <br>
     *<br>
     * 字段名： payment_order.PaymentCurrencyType
     */
    public String getPaymentCurrencyType() {
        return paymentCurrencyType;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付币种<br>
     *<br>
     * 字段名： payment_order.PaymentCurrencyType
     */
    public void setPaymentCurrencyType(String paymentCurrencyType) {
        this.paymentCurrencyType = paymentCurrencyType == null ? null : paymentCurrencyType.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   支付金额    <br>
     *<br>
     * 字段名： payment_order.PaymentPrice
     */
    public BigDecimal getPaymentPrice() {
        return paymentPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付金额<br>
     *<br>
     * 字段名： payment_order.PaymentPrice
     */
    public void setPaymentPrice(BigDecimal paymentPrice) {
        this.paymentPrice = paymentPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付人民币金额    <br>
     *<br>
     * 字段名： payment_order.RmbAmount
     */
    public BigDecimal getRmbAmount() {
        return rmbAmount;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付人民币金额<br>
     *<br>
     * 字段名： payment_order.RmbAmount
     */
    public void setRmbAmount(BigDecimal rmbAmount) {
        this.rmbAmount = rmbAmount;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付订单号    <br>
     *<br>
     * 字段名： payment_order.PaymentNo
     */
    public String getPaymentNo() {
        return paymentNo;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付订单号<br>
     *<br>
     * 字段名： payment_order.PaymentNo
     */
    public void setPaymentNo(String paymentNo) {
        this.paymentNo = paymentNo == null ? null : paymentNo.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   支付成功时间    <br>
     *<br>
     * 字段名： payment_order.PaymentTime
     */
    public Date getPaymentTime() {
        return paymentTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付成功时间<br>
     *<br>
     * 字段名： payment_order.PaymentTime
     */
    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付备注信息    <br>
     *<br>
     * 字段名： payment_order.PaymentRemarks
     */
    public String getPaymentRemarks() {
        return paymentRemarks;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付备注信息<br>
     *<br>
     * 字段名： payment_order.PaymentRemarks
     */
    public void setPaymentRemarks(String paymentRemarks) {
        this.paymentRemarks = paymentRemarks == null ? null : paymentRemarks.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   退款金额(目前全额退款)    <br>
     *<br>
     * 字段名： payment_order.RefundPrice
     */
    public BigDecimal getRefundPrice() {
        return refundPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   退款金额(目前全额退款)<br>
     *<br>
     * 字段名： payment_order.RefundPrice
     */
    public void setRefundPrice(BigDecimal refundPrice) {
        this.refundPrice = refundPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   支付状态;支付中;支付成功;支付失败;退款中,退款成功,退款失败    <br>
     *<br>
     * 字段名： payment_order.Status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置参数<br><br>
     *
     *   支付状态;支付中;支付成功;支付失败;退款中,退款成功,退款失败<br>
     *<br>
     * 字段名： payment_order.Status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： payment_order.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： payment_order.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： payment_order.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： payment_order.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： payment_order.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： payment_order.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： payment_order.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： payment_order.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： payment_order.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： payment_order.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        paymentOrderId("PaymentOrderId", "paymentOrderId", "INTEGER", false),
        userId("UserId", "userId", "INTEGER", false),
        bizType("BizType", "bizType", "VARCHAR", false),
        orderNo("OrderNo", "orderNo", "VARCHAR", false),
        prepaidCurrencyType("PrepaidCurrencyType", "prepaidCurrencyType", "VARCHAR", false),
        prepaidPrice("PrepaidPrice", "prepaidPrice", "DECIMAL", false),
        paymentType("PaymentType", "paymentType", "VARCHAR", false),
        paymentCurrencyType("PaymentCurrencyType", "paymentCurrencyType", "VARCHAR", false),
        paymentPrice("PaymentPrice", "paymentPrice", "DECIMAL", false),
        rmbAmount("RmbAmount", "rmbAmount", "DECIMAL", false),
        paymentNo("PaymentNo", "paymentNo", "VARCHAR", false),
        paymentTime("PaymentTime", "paymentTime", "TIMESTAMP", false),
        paymentRemarks("PaymentRemarks", "paymentRemarks", "VARCHAR", false),
        refundPrice("RefundPrice", "refundPrice", "DECIMAL", false),
        status("Status", "status", "INTEGER", true),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}